@layout("/common/_container.html"){
<div class="row">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <!--<div class="ibox-title">-->
            <!--<h5>广告</h5>-->
            <!--</div>-->
            <div class="row">
                <div class="col-sm-6 b-r">
                    <div class="ibox-content">
                        <form class="form-horizontal">
                            <!--<div class="form-group">-->
                                <!--<label class="col-sm-2 control-label">广告标题</label>-->

                                <!--<div class="col-sm-10">-->
                                    <!--<input type="text" id="headTitle" class="form-control" placeholder="设置标题">-->
                                <!--</div>-->
                            <!--</div>-->

                            <!--<div class="hr-line-dashed"></div>-->
                            <div class="form-group" style="margin-left: 0.06%">
                                <label class="col-sm-2 control-label">广告头部</label>
                                <div class="col-sm-10">
                                    <select class="form-control m-b" id="head" name="head">
                                        <option value="">选择广告头部</option>
                                        <!--<option value="1">默认海报</option>-->
                                        <option value="5">文字</option>
                                        <option value="2">图片</option>
                                        <option value="3">视频</option>
                                        <option value="4">不设置</option>
                                    </select>
                                    <div class="col-sm-12" id="headArea"></div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="col-sm-12" id="contentArea">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">广告内容</label>
                                        <div style="margin-left: 19%">
                                            <button class="btn btn-info " type="button" id="addTitle"><i
                                                    class="fa fa-paste"></i>添加标题
                                            </button>
                                            <button class="btn btn-info " type="button" id="addBody"><i class="fa fa-paste"></i>添加正文
                                            </button>
                                            <button class="btn btn-info " type="button" id="addPic"><i class="fa fa-paste"></i>添加图片
                                            </button>
                                            <button class="btn btn-info " type="button" id="addHtml"><i class="fa fa-paste"></i>添加h5
                                            </button>
                                            <button class="btn btn-info " type="button" id="addVideo"><i
                                                    class="fa fa-paste"></i>添加视频
                                            </button>
                                        </div>
                                    <div id="content"></div>

                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-6 col-sm-offset-2">
                                    <button class="btn btn-white" type="button" onclick="_preview()">预览</button>
                                    <button class="btn btn-primary" type="button" onclick="_showDetails()">查看详情</button>
                                    <button class="btn btn-warning" type="button" onclick="_editDetailsContent()">编辑详情</button>
                                    <textarea style="height: 800px;width: 630px;" id='detail'></textarea>
                                </div>
                            </div>
                        </form>
                    </div>

                </div>
                <div class="col-sm-6">
                    <div id='head_preview' style='padding:0px 20px 20px 20px'>
                        <!-- 这里展示广告头 -->
                    </div>
                    <div id='content_preview' style='padding:0px 20px 20px 20px'>
                        <!-- 这里展示广告内容 -->
                    </div>
                    <div id='bottom_preview' style='padding:0px 20px 20px 20px'>
                        <!-- 这里展示附加内容 -->
                    </div>
                    <!--<script type="text/javascript">-->

                        <!--var text = localStorage.getItem('adv-content');-->
                        <!--// if (text == null) {-->
                        <!--//     alert("请通过 localStorage.setItem('adv-content', '广告内容') 设置好广告内容再打开本页面。");-->
                        <!--// }-->
                        <!--$(function () {-->
                            <!--alert(1);-->
                            <!--parseAndShowXML(text, 'head_preview', 'content_preview', 'bottom');-->
                        <!--})-->
                    <!--</script>-->
                </div>
            </div>
        </div>
    </div>
</div>
<script src="${ctxPath}/static/modular/wz/wzAdv_edit/wzAdv_details_head.js"></script>
<script src="${ctxPath}/static/modular/wz/wzAdv_edit/wzAdv_details_content.js"></script>
<script src="${ctxPath}/static/modular/wz/wzAdv_edit/wzAdv_details_other.js"></script>
<script src="${ctxPath}/static/modular/wz/wzAdv_edit/wzAdv_details_preview.js"></script>
<script src="${ctxPath}/static/modular/wz/wzAdv_edit/wzAdv_details_edit.js"></script>
<script src="${ctxPath}/static/js/wz/img_up.js"></script>
<script type="text/template" id="picTemplate">
    <div class="form-group" style="margin-top: 10px" id="pic">
        <label class="col-sm-2 control-label">图片id</label>
        <div class="col-sm-10">
            <input type="pic" class="form-control" id="picId"
                   style="width: 70%;font-size: 25px;font-weight: bold;color: #101010;" placeholder="">
            <!--<#button btnCss="info" name="确定" id="ensureContent" icon="fa-check"/>-->
            <div style="margin-top: 3px">
            <#button btnCss="danger" name="取消" id="deletePic" icon="fa-remove"/>
            </div>
        </div>

    </div>
</script>

<script type="text/template" id="videoTemplate">
    <div class="form-group" style="margin-top: 10px" id="video">
        <label class="col-sm-2 control-label">视频id</label>
        <div class="col-sm-10">
            <input type="video" class="form-control"  id="videoId"
                   style="width: 70%;font-size: 25px;font-weight: bold;color: #101010;" placeholder="">
            <div>
                <label class="control-label" style="margin-left: -11.5%;margin-top: 2%">截帧秒</label>
                <input  type="scTime" class="form-control"
                       style="width: 20%;font-size: 25px;font-weight: bold;color: #101010;margin-top: -3.8%" placeholder="">
            </div>
            <!--<#button btnCss="info" name="确定" id="ensureContent" icon="fa-check"/>-->
            <div style="margin-top: 3px">
            <#button btnCss="danger" name="取消" id="deleteVideo" icon="fa-remove"/>
            </div>
        </div>

    </div>
</script>
<script type="text/template" id="titleTemplate">
    <div class="form-group" style="margin-top: 10px" id="title">
        <label class="col-sm-2 control-label">标题</label>
        <div class="col-sm-10">
            <input type="title" class="form-control" id="text"
                   style="width: 70%;font-size: 25px;font-weight: bold;color: #101010;" placeholder="">
            <!--<#button btnCss="info" name="确定" id="ensureContent" icon="fa-check"/>-->
            <div style="margin-top: 3px">
            <#button btnCss="danger"  name="取消" id="deleteTitle" icon="fa-remove"/>
            </div>
        </div>
    </div>
</script>

<script type="text/template" id="HtmlTemplate">
    <div class="form-group" style="margin-top: 10px" id="html">
        <label class="col-sm-2 control-label">h5</label>
        <div class="col-sm-10">
            <input type="html" class="form-control" id="htmlId"
                   style="width: 70%;color: #101010;" placeholder="">
            <!--<#button btnCss="info" name="确定" id="ensureContent" icon="fa-check"/>-->
            <div style="margin-top: 3px">
                <#button btnCss="danger"  name="取消" id="deleteHtml" icon="fa-remove"/>
            </div>
        </div>
    </div>
</script>

<script type="text/template" id="bodyTemplate">
    <div class="form-group" style="margin-top: 10px" id="body">
        <label class="col-sm-2 control-label">正文</label>
        <div class="col-sm-10">
            <textarea id="textArea" style="width: 100%;height: 120px;font-size: 19px;color:#878787;"></textarea>
            <div style="margin-top: 3px">
            <#button btnCss="danger" name="取消" id="deleteBody" icon="fa-remove"/>
            </div>
        </div>
    </div>
</script>
@}
